package com.xd.wecat.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@org.springframework.stereotype.Controller
public class Controller {
    @RequestMapping("/index")
    @ResponseBody
    public Map<String,Object> index(String username,String password){
        System.out.println(username);
        System.out.println(password);
        System.out.println("调用微信小程序");
        Map<String,Object> map=new HashMap<>();
        if (username.equals("admin")&&password.equals("123")){
            map.put("code",200);
            map.put("result","ok");
        }else {
            map.put("result","fail");
        }
        return map;
    }
}
